A solver for systems differential algebraic equations (DAE). More...
#include <dae_solver.hpp>
Public Types | |
typedef DAESolverInterface< T, I >::VectorType | VectorType |
typedef DAESolverInterface< T, I >::MatrixType | MatrixType |
typedef DAESolverInterface< T, I >::JacobianBuilder | JacobianBuilder |
typedef DAESolverInterface< T, I >::FunctionBuilder | FunctionBuilder |
typedef DAESolverInterface< T, I >::StepFunction | StepFunction |
Public Member Functions | |
DAESolverT (const parallel::Communicator &comm, const int local_size, JacobianBuilder &jbuilder, FunctionBuilder &fbuilder) | |
Default constructor. | |
~DAESolverT (void) | |
Destructor. | |
void | initialize (const double &t0, const double &deltat0, VectorType &x0) |
Initialize the solver. | |
void | solve (double &maxtime, int &maxsteps) |
Solve the system to when end_time or maxsteps is exceeded. |
A solver for systems differential algebraic equations (DAE).
typedef DAESolverInterface<T, I>::FunctionBuilder gridpack::math::DAESolverT< T, I >::FunctionBuilder |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.
typedef DAESolverInterface<T, I>::JacobianBuilder gridpack::math::DAESolverT< T, I >::JacobianBuilder |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.
typedef DAESolverInterface<T, I>::MatrixType gridpack::math::DAESolverT< T, I >::MatrixType |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.
typedef DAESolverInterface<T, I>::StepFunction gridpack::math::DAESolverT< T, I >::StepFunction |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.
typedef DAESolverInterface<T, I>::VectorType gridpack::math::DAESolverT< T, I >::VectorType |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.
gridpack::math::DAESolverT< T, I >::DAESolverT | ( | const parallel::Communicator & | comm, | |
const int | local_size, | |||
JacobianBuilder & | jbuilder, | |||
FunctionBuilder & | fbuilder | |||
) |
Default constructor.
comm | parallel environment for this instance | |
local_size | size of problem owned by this process (rows in Jacobian, elements in solution Vector) | |
jbuilder | function/functor to build Jacobian | |
fbuilder | function/functor to build function |
gridpack::math::DAESolverT< T, I >::~DAESolverT | ( | void | ) |
Destructor.
void gridpack::math::DAESolverT< T, I >::initialize | ( | const double & | t0, | |
const double & | deltat0, | |||
VectorType & | x0 | |||
) |
Initialize the solver.
t0 | start time | |
deltat0 | initial time step | |
x0 | Vector to use for the solution, initially filled with values corresponding to t0 |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.
void gridpack::math::DAESolverT< T, I >::solve | ( | double & | maxtime, | |
int & | maxsteps | |||
) |
Solve the system to when end_time
or maxsteps
is exceeded.
This solves the system from the initial time specified by initialize() or continues the solution from the end time of the previous call to solve(). After the solution completes, the solution is placed back in the Vector passed to initialize()
maxtime | time at which solution is to end (in); actual time at which solution ended (out) | |
maxsteps | maximum number of time steps to perform (in); actual number of time steps performed | |
solution | system solution at maxtime (out) |
Reimplemented from gridpack::math::DAESolverInterface< T, I >.